﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%var lstTask = ViewData["lstTask"] as IEnumerable<QLDAOL.Models.DIVISION_TASK>; %>
<div class="block">
<table id="tb_task" class="tb_task">
<tr class="tb_head">
    <td>Task</td>
    <td>Owner</td>
    <td>Start</td>
    <td>Deadline</td>
    <td>Status</td>
    <td></td>
    </tr>
 <% if (lstTask != null)
       {
           int i = 0; foreach (var task in lstTask)
           {
               i++;%>
               <tr>
<td><%=task.TASK.Task1 %></td>
<td><%=task.USER.UserName %></td>
<td><%=DateTime.Parse(task.Date_Start.ToString()).ToShortDateString() %></td>
<td><%=DateTime.Parse(task.Deadline.ToString()).ToShortDateString()%></td>
<td><%=task.TASK.DM_State.TaskState %></td>
<td><a onclick="edittask(<%=task.ID %>);">Edit</a></td>
</tr>
    <%}
   } %>


</table>
   
    <div class="width25 paddingLR10 fr">
        <input type="button" id="btn_add" class="marginA5 button" value="Add Task" onclick="addtask();" />
    </div>
</div>
